module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: process.env.NODE_ENV === 'development' ? 'https://autumnfish.cn' : 'https://autumnfish.cn',  // 接口域名
        secure: false,  // 如果是https接口，需要配置这个参数
        changeOrigin: true,  //是否跨域
        pathRewrite: {
          '^/api': ''   //需要rewrite的,
        }
      }
    },
  },
  pluginOptions: {
    electronBuilder: {
      nodeIntegration: true,
      builderOptions: {
        productName: "Vue-Electron-NeteaseCloudMusic", //项目名，也是生成的安装文件名
        appId: "com.example.Vue-Electron-NeteaseCloudMusic", //唯一标识
        copyright: "CuiCheng © 2021", //版权信息
        win: {
          icon: "src/assets/wangyiyunIcon.png",
          target: [
            {
              target: "nsis",
            },
          ],
        },
        linux: {
          icon: "src/assets/wangyiyunIcon.png",
          target: ["AppImage"],
        },
        nsis: {
          shortcutName: "Vue-Electron-NeteaseCloudMusic",
          oneClick: false,
          allowElevation: true,
          allowToChangeInstallationDirectory: true,
          perMachine: true,
          installerIcon: "./src/assets/wangyiyunIcon.ico", // 安装图标
          uninstallerIcon: "./src/assets/wangyiyunIcon.ico", //卸载图标
          installerHeaderIcon: "./src/assets/wangyiyunIcon.ico", // 安装时头部图标
          createDesktopShortcut: true, // 创建桌面图标
          createStartMenuShortcut: true, // 创建开始菜单图标
        },
      },
    },
  },
  lintOnSave: false,
};
